#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
char* my_strncpy(char* dest, const char* arr, size_t se)
{
	size_t ret = strlen(arr);
	
	for (int i = 0; i < se; i++)
	{
		if (i > ret)
		{
			*(dest + i) = 0;
			continue;
		}
		*(dest + i) = *(arr + i);
	}
	return dest;
}
int main()
{
	char arr[20] = "123456789";
	char dest[20] = "aaaaaaaaaa";
    my_strncpy(dest, arr, 5);
	printf(dest);
	return 0;
}